package com.sven;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("hello")
public class HelloController {

    //使用dubbo提供的@Reference注解获得衣蛾远程代理对象
    @Reference(url = "dubbo://192.168.27.1:20880/com.sven.IHelloService")
    private IHelloService helloService;

    @RequestMapping("f01")
    public String hello(){
        String st = helloService.sayHello("沙县");
        return st;
    }
}
